package circuit1;

/*
 * Borovicska Szglab4 2011
 * @package circuit1
 */




/**
 *
 * @author Erik
 */
public class Switch extends SignalSource {

    private boolean signal;

    public Switch() {

    }

    public void setSignal(boolean value) {
        signal = value;
    }
    
    public boolean getSignal() {
        return signal;
    }

    public void prod() {
        output.setValue(signal);
    }

    public boolean act() {
        signal = !signal;
        return signal;
    }
    
    public void on() {
        signal = true;
    }
    
    public void off() {
        signal = false;
    }
    public boolean getOut(){
        return signal;
    }
}
